package com.ljt.business.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ljt.business.entity.ApplyFor;
import com.ljt.business.entity.ApplyForDetail;
import com.ljt.business.service.ApplyForDetailService;
import com.ljt.business.service.ApplyForService;
import com.ljt.business.service.ApplyForVoService;
import com.ljt.business.vo.ApplyForVo;
import com.ljt.response.Result;
import com.ljt.system.entity.Department;
import com.ljt.system.vo.DepartmentVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author ljt
 * @since 2021-07-05
 */
@RestController
@RequestMapping("/applyFor")
@Api(value = "申请明细模块", tags = "业务申请明细接口")
@CrossOrigin
public class ApplyForDetailController {

    @Autowired
    private ApplyForDetailService applyForDetailService;

    @PostMapping("/insertApplyForDetail")
    @ApiOperation(value = "添加申请信息",notes = "添加申请")
    public Result insertApplyForDetail(@RequestBody ApplyForDetail applyForDetail){

        /*
        applyId

        [pid,applyNum]


         */


        boolean i=applyForDetailService.save(applyForDetail);
        if (i){
            return Result.ok();
        }else{
            return Result.error();
        }
    }


}
